<template>
	<div class="content">
		<p style="height: 16rpx;"></p>
		<div class="member_box">
			<div class="member">
				<img v-for="(item,index) in list" :src="item.avatar?item.avatar:'/static/mr_tx.png'"  alt="">
			</div>
		</div>
		<p style="height: 16rpx;"></p>
	</div>
</template>

<script>
	import { mapState } from 'vuex'
	import api from '@/api';
	export default {
		data() {
			return {
				param:{
					pageNo:0,
					pageSize:23,
					groupId:1
				},
				list:[],
				userMsg:{}
			}
		},
		computed: {
			...mapState({
				userId: state => state.user.userId,
			})
		},
		methods: {
			async getGroupUserList(){
				await api.user.sell_group_user(this.param).then(res=>{
					if(res.code == 200){
						this.list = res.data.list
						uni.setNavigationBarTitle({
							title: `群成员（${res.data.total}）`
						});
					}
				})
			},

		},
		onLoad(options) {
			this.param.groupId = options.groupId
			this.getGroupUserList()
		},
		onShow(){
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		background: #f7f7f7;
		min-height: 100vh;
		.member_box{
			padding:0 26rpx 26rpx 26rpx;
			background: #fff;
			border-radius: 12rpx;
			margin:0 30rpx;
			min-height: 100vh;
			.member{
				display: flex;
				flex-wrap:wrap;
				img{
					display: block;
					width: 84rpx;
					height: 84rpx;
					border-radius: 8rpx;
					margin:18rpx 26rpx 0 0;
					&:nth-child(6n){
						margin-right:0;
					}
				}
				.anniu{
					width: 42px;
					height: 42px;
					border-radius: 4px;
					box-sizing: border-box;
					border: 1px dashed #999999;
					background: none;
					margin:18rpx 0 0 0;
					display: flex;
					align-items: center;
					justify-content: center;
					&::after{
						border:none;
					}
				}
			}
			.more{
				text-align: center;
				font-size: 26rpx;
				margin-top:30rpx;
				color: #999999;
			}
		}
	}
</style>
